package com.ghpt.service.impl;
import com.ghpt.mapper.DianWangMapper;
import com.ghpt.pojo.DianWang;
import com.ghpt.service.DianWangService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DianWangServiceImpl implements DianWangService {
    @Autowired
    private DianWangMapper dianWangMapper;

    @Override
    public DianWang findDianWangById(Long id) {
        if (id != null) {
            return dianWangMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(DianWang dianWang) {
        return dianWangMapper.updateById(dianWang);//更新成功为1否则为0
    }
}
